Skip to content

Conversation

@wyyalt
Copy link
Collaborator

@wyyalt wyyalt commented Jun 25, 2025

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Comment on lines +15 to +40
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
- uses: actions/checkout@v4
- name: Install system dependencies (clang)
run: |
python -m pip install --upgrade pip
pip install flake8 black
sudo apt-get update
sudo apt-get install -y clang libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev
- name: Install pyenv
run: |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- name: Install system dependencies (python)
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
CC=clang pyenv install 3.6.12 -v
sudo ln -sf $PYENV_ROOT/versions/3.6.12/bin/python3.6 /usr/local/bin/python3.6
python3.6 -m pip install --upgrade pip
python3.6 -m pip install flake8==3.9.2 black==21.12b0
- name: Lint with flake8
run: |
flake8
python3.6 -m flake8
- name: Format with black
run: |
black .
python3.6 -m black .

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the minimal permissions required for the workflow to function. Based on the workflow's steps, it does not appear to require any write permissions, so we will set contents: read as the permission. This ensures that the workflow has only read access to the repository contents.

Suggested changeset 1
.github/workflows/flake8_and_black.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/flake8_and_black.yml b/.github/workflows/flake8_and_black.yml
--- a/.github/workflows/flake8_and_black.yml
+++ b/.github/workflows/flake8_and_black.yml
@@ -5,2 +5,5 @@
 
+permissions:
+  contents: read
+
 on:
EOF
@@ -5,2 +5,5 @@

permissions:
contents: read

on:
Copilot is powered by AI and may make mistakes. Always verify output.

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the issue, add a permissions block at the root of the workflow file. This block will define the minimal permissions required for the workflow. Based on the tasks in the workflow, the following permissions are needed:

  • contents: read for accessing the repository's code.
  • actions: write for uploading coverage reports to Codecov.

The permissions block should be added at the top level of the workflow file, ensuring it applies to all jobs in the workflow.


Suggested changeset 1
.github/workflows/unittest.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml
--- a/.github/workflows/unittest.yml
+++ b/.github/workflows/unittest.yml
@@ -2,2 +2,6 @@
 
+permissions:
+  contents: read
+  actions: write
+
 on:
EOF
@@ -2,2 +2,6 @@

permissions:
contents: read
actions: write

on:
Copilot is powered by AI and may make mistakes. Always verify output.

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Unittest' step
Uses Step
uses 'codecov/codecov-action' with ref 'v5', not a pinned commit hash
Mianhuatang8 and others added 18 commits July 11, 2025 16:22
* fix: 公共流程可见范围提测问题修复 --ignore
# Reviewed, transaction id: 49836

* fix: 删除调试语句 --ignore

* fix: 获取公共流程可见列表增加参数以及中文国际化处理 --ignore
# Reviewed, transaction id: 50005

* Merge branch 'common_process_scope_Problem' of https://github.com/TencentBlueKing/bk-sops into common_process_scope_Problem
# Reviewed, transaction id: 50006

* fix:: 增加国际化词条 --ignore
# Reviewed, transaction id: 50012

* fix: 优化代码 --ignore
# Reviewed, transaction id: 50016
# Reviewed, transaction id: 50061
feat: 导出yaml文件添加auto_retry配置 #7907
# Reviewed, transaction id: 50390
* fix: 公共流程新增列表页修改接口 #7824
# Reviewed, transaction id: 50209

* fix: 修改字段注释 #7824
# Reviewed, transaction id: 50211
# Reviewed, transaction id: 50539
refactor: 更新依赖 #ignore
# Reviewed, transaction id: 50563
# Reviewed, transaction id: 50569
fix: 修复http插件测试问题 --story=125852796
@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2025

Codecov Report

❌ Patch coverage is 50.24038% with 621 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.62%. Comparing base (ef33725) to head (21559e9).
⚠️ Report is 494 commits behind head on dev_multi_tenant.

⚠️ Current head 21559e9 differs from pull request most recent head 785d0ff

Please upload reports for the commit 785d0ff to get more accurate results.

Files with missing lines Patch % Lines
gcloud/contrib/cleaner/tasks.py 0.00% 94 Missing ⚠️
...cloud/core/apis/drf/serilaziers/common_template.py 20.00% 68 Missing ⚠️
gcloud/core/apis/drf/viewsets/task_template.py 11.86% 52 Missing ⚠️
gcloud/utils/webhook.py 27.53% 50 Missing ⚠️
...s/sites/open/monitor/alarm_shield_strategy/v2_0.py 36.23% 44 Missing ⚠️
gcloud/apigw/views/utils.py 31.25% 33 Missing ⚠️
...ollections/sites/open/monitor/alarm_shield/v2_0.py 40.00% 33 Missing ⚠️
gcloud/core/apis/drf/serilaziers/periodic_task.py 23.80% 32 Missing ⚠️
gcloud/core/apis/drf/viewsets/common_template.py 19.23% 21 Missing ⚠️
gcloud/taskflow3/signals/handlers.py 20.00% 20 Missing ⚠️
... and 44 more
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           dev_multi_tenant    #7844      +/-   ##
====================================================
- Coverage             58.99%   58.62%   -0.37%     
====================================================
  Files                   655      665      +10     
  Lines                 34599    35580     +981     
====================================================
+ Hits                  20410    20858     +448     
- Misses                14189    14722     +533     
Files with missing lines Coverage Δ
config/default.py 77.51% <100.00%> (+0.40%) ⬆️
config/stag.py 0.00% <ø> (ø)
env.py 98.90% <100.00%> (+0.07%) ⬆️
gcloud/analysis_statistics/tasks.py 16.93% <100.00%> (ø)
gcloud/apigw/decorators.py 81.01% <100.00%> (ø)
gcloud/apigw/serializers.py 100.00% <100.00%> (ø)
gcloud/apigw/views/get_template_schemes.py 100.00% <100.00%> (ø)
gcloud/apigw/views/node_callback.py 85.36% <100.00%> (+0.75%) ⬆️
gcloud/apigw/views/operate_node.py 83.33% <100.00%> (+0.40%) ⬆️
gcloud/apigw/views/operate_task.py 91.48% <100.00%> (+0.18%) ⬆️
... and 74 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef33725...785d0ff. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dengyh and others added 8 commits July 16, 2025 16:53
feat: 节点管理安装任务,TJJ密码类型不请求公钥 (closed #7916)
# Reviewed, transaction id: 50799
# Reviewed, transaction id: 50993
feat: 模板列表页面增加标签修改接口 --story=125724568
dengyh and others added 30 commits October 30, 2025 11:02
refactor: 所有celery worker默认增加自动重启的机制 --story=128084168
# Reviewed, transaction id: 63377
feat: 企微插件新增版本支持markdown_v2格式 --story=128614608
fix: 修复模板导出和周期任务更新问题 --story=149963760
feat: HTTP回调增加参数 --story=128420474
refactor: celery prometheus exporter 增加重启机制 --story=128084168
# Reviewed, transaction id: 64899
# Reviewed, transaction id: 64902
feat: 企微插件新增版本 --story=128614608
# Reviewed, transaction id: 65286
refactor: callback接口支持异步重试来作为降级处理的方案 --story=128811166
refactor: 增加日志排查callback失败的问题 --story=128811166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants